<?php
/* @var $this CompanyExtendController */
/* @var $model CompanyExtend */

$this->breadcrumbs=array(
    'Company Extends'=>array('index'),
    'Create',
);
 
?>
<script type="text/javascript">
    $(document).ready(function(e) { 
        if(<?php echo isset($code)?"true":"false" ?> ){ 
           setTimeout(function(){$('.phonesview').click()},500) ;
        } 
    }); 
</script>
<h1>微信信息设置</h1> 
 
 <div class="form">
 
<?php $form=$this->beginWidget('CActiveForm', array(
    'id'=>'company-extend-form',
    'enableAjaxValidation'=>false, 
    'htmlOptions' => array('enctype'=>'multipart/form-data'),
)); ?>
  <p style="color: red;font-size: 14px;"> <?php echo empty($message)?'':''.$message; ?></p>
    <p class="note"><span class="required">*</span> 是必填内容.</p>  

     <div class="row">
        <?php echo CHtml::label("微信图标",false,array('required'=>true)); ?>
        <?php echo CHtml::fileField('wxicon'); ?>
        <?php echo CHtml::hiddenField('owxicon',empty($model['wxicon'])?'':$model['wxicon']); ?>
        <?php echo CHtml::label("建议：200px * 200px",false); ?> 
    </div>

     <div class='row'> 
        <?php  
          if(!empty($model['wxicon'])){ 
            echo CHtml::label("微信icon预览",false); 
            echo CHtml::image(Yii::app()->baseUrl.$model['wxicon'],'',array("width"=>"100px","height"=>"100px")); 
          }  
         ?>
    </div> 

     <div class="row">
        <?php echo CHtml::label("微信名称",false,array('required'=>true)); ?>
        <?php echo CHtml::textField('wxname',empty($model['wxname'])?'':$model['wxname']); ?> 
    </div>  
     <?php if((!empty($model['wxicon']) && !empty($model['wxname']))?true:false){?>
      <div class="row">
            <?php echo CHtml::label("微信关注登陆url：",false);  ?>
            <?php echo CHtml::label($wxloginurl,false,array('style'=>'width:68%;font-size:12px;')); ?> 
            <?php echo CHtml::label("说明：将url地址放到微信公共账号关注后自动回复中,提示用户点击此网址能够免费上网",false,array('style'=>'width:100%;font-size:12px;color:red;')); ?>
        </div> 
     <?php }?>

        <div class="row buttons">
            <?php echo CHtml::submitButton('维护',array('class'=>'subButton')); ?>
        </div>
<?php $this->endWidget(); ?>
</div><!-- form -->